<template>
  <div>
    <div style="display: flex">
      <div v-for="item in list" :key="item">
        <input type="checkbox" :value="item" v-model="hobby" /><span>{{
          item
        }}</span>
      </div>
    </div>
    <ul>
      <li v-for="item in hobby" :key="item">{{ item }}</li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: ['科幻', '喜剧', '动漫', '冒险', '科技', '军事', '娱乐', '奇闻'],
      hobby: [],
    }
  },
}
</script>

<style></style>
